//
//  BuyCarModel.m
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/8/11.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "BuyCarModel.h"
#import "NormalShopGoodsModel.h"

@implementation BuyCarModel

- (instancetype )initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.freight = [dict[@"freight"] floatValue];
        self.shopName = dict[@"shopName"];
        self.productList = [NSMutableArray array];
        for (NSDictionary *goodsDict in dict[@"productList"]) {
            NormalShopGoodsModel *model = [NormalShopGoodsModel objectWithDict:goodsDict];
            model.superModel = self;
            [self.productList addObject:model];
        }
    }
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[BuyCarModel alloc]initWithDict:dict];
}

@end
